package main

import (
	"flag"
	"gin-web/app"
	"gin-web/app/http"
	"os"
)

func main() {
	prjHome := flag.String("prjHome", "", "引入的项目目录")
	flag.Parse()
	if *prjHome == "" {
		dir, err := os.Getwd()
		if err != nil {
			panic(err)
		}

		*prjHome = dir
	}

	//加载配置文件
	if err := app.Init(*prjHome); err != nil {
		panic(err)
	}

	//实例化服务
	err := http.NewService()
	if err != nil {
		panic(err)
	}
}
